package cn.zqy.demo.day08;

import java.util.ArrayList;

/**
 * 数学类练习
 * -10.8 ~ 5.9间，绝对值大于6或者小于2.1的整数值个数
 * */
public class Demo02MathPrictice {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        double max = 5.9;
        double min = -10.8;
        for(double num = Math.ceil(min); num <= max ; ++num) {
            if (Math.abs(num) > 6 || Math.abs(num) < 2.1) {
                // 强制转换int
                list.add((int) num);
                System.out.println((int) num);
            }
        }
        Integer f1 = 100, f2 =100, f3 = 150, f4=150;
        System.out.println(f1 == f2);
        System.out.println(f3 == f4);
        System.out.println("长度： "+list.size());
    }
}
